import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] arr = new int[n + 1];
        int[] brr = new int[n + 1];
        for (int i = 0; i < n + 1; i++) {
            arr[i] = in.nextInt();
        }
        for (int i = 1; i < n; i++) {
            brr[i] = in.nextInt();
        }
        brr[n] = 0;
        int[] w = new int[n];
        for(int i = 0; i < n; i++){//循环依次发生意外的区域
            int sum = 0;//表示手里现在有多少能量
            for(int j = 0; j < n + 1; j++){//循环每次发生意外需要的初始能量
                if(i == j){
                    if(sum < arr[j]){
                        w[i] += arr[i];
                        continue;
                    }
                }
                sum += brr[j];
                if(sum < arr[j]){
                    w[i] += arr[j]-brr[j];
                }
                sum -= arr[j];
            }
            if(sum < arr[n]){
                w[i] += arr[n-1] - brr[n-1];
            }
        }
        for (int i = 0; i < n; i++) {
            System.out.print(w[i]+" ");
        }
    }
}
